import { defineStore } from 'pinia'
import { ref } from 'vue'

export const usePlayListStore = defineStore(
  'playlist',
  () => {
    const playlist = ref([])

    const setPlaylist = (list) => {
      playlist.value = list
    }

    return {
      playlist,
      setPlaylist
    }
  },
  {
    persist: {
      key: 'ONLINE_MUSIC_PLAYLIST',
      storage: sessionStorage
    }
  }
)
